#pragma once
#include <stdio.h>
#define NONE_FLUSH (1<<0)
#define LINE_FLUSH (1<<1)
#define FULL_FLUSH (1<<2)
#define Max 1024

typedef struct IO_FILE{
    int fileno;
    int flag;
    char outbuffer [Max];
    int bufferlen;
    int flush_method;
}MyFile;

Mystdio *Myopen(const char* filename, const char* mode);
size_t  Mywrite(const void *ptr, size_t size, size_t nmemb, Mystdio *stream);
int Myclose(Mystdio *stream);
int Myflush(Mystdio *stream);
